<?php
// Console

include "config.php";

$sql = mysql_query("Select * from img");
$i = 0;
while ($row = mysql_fetch_array($sql)){

//$linha['nome'] = $row['nome'];
$form = $row['formato'];
//echo "Z : " . $linha[$i];
//echo $linha["nome"];
$t = ["nome" =>$row['nome']];
echo $t[$i];
$i++;
}

/* Exemplo funcional;
Array's passadas via Json (obj.js)*/
//echo json_encode(array("nome" => array("teste", "teste3", "teste4"), "f" => array("teste2F","teste3F")));
?>	